package buildcode.language.simple;

import java.util.Arrays;
import java.util.List;

import org.apache.commons.lang3.StringUtils;

import buildcode.build.AbstractSingleTableCommandExecuter;
import buildcode.config.EntityExportConfig;
import buildcode.database.DataBaseTable;
import buildcode.language.Type;

public class DefaultCommandExecute extends AbstractSingleTableCommandExecuter {

    public DefaultCommandExecute() {
        super();
    }

    @Override
    public List<Type> execute(DataBaseTable base, EntityExportConfig config) {
        SimpleType entity = new SimpleType(StringUtils.firstNonBlank(config.getFileName(), base.getCamelCaseName() + config.getSuffix()), "");
        return Arrays.asList(entity);
    }

}
